//
//  SimActionSheet.h
//

#import <UIKit/UIKit.h>
#import "SimDefine.h"

#define kSimActionSheetDefaultBtnColor          HEXRGBCOLOR(0x5e6166)
#define kSimActionSheetDefaultWarningColor      HEXRGBCOLOR(0xfe6461)

SimDefineValue(kSimActionTitleMargin, int);
SimDefineValue(kSimActionSheetHeight, int);

SimDefineValue(kSimActionDefaultBtnTitleColor, UIColor *);
SimDefineValue(kSimActionDefaultCancelGapColor, UIColor *);
SimDefineValue(kSimActionDefaultLineColorColor, UIColor *);



typedef void (^ClickOnIndex)(NSInteger index);
typedef UIColor *(^ColorForIndex)(NSInteger index);
typedef NSString *(^TextForIndex)(NSInteger index);
typedef int (^TotalBtnCount)();

@interface SimActionSheet : UIView {
    UIView *backgroundImage;
    UIView *panel;
}

@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) NSString* subtitle;

@property (nonatomic, readwrite) BOOL showCancel; //default is YES
@property (nonatomic, strong) id userInfo;

@property (nonatomic, readwrite) float titleFontSize;
@property (nonatomic, readwrite) float subtitleFontSize;
@property (nonatomic, readwrite) float btnFontSize;

@property (nonatomic, strong) UIColor *backgroundColor;
@property (nonatomic, strong) UIColor *titleColor;
@property (nonatomic, strong) UIColor *subtitleColor;

@property (nonatomic, strong) TotalBtnCount totalBtnCount;
@property (nonatomic, strong) ColorForIndex btnTextColorForIndex;
@property (nonatomic, strong) TextForIndex  btnTitleForIndex;
@property (nonatomic, strong) ClickOnIndex clickOnIndex;

-(instancetype)initWithTitle:(NSString *)caption;
-(void)showInView:(UIView *)view;
- (void)hideAlert;

@end
